package com.bean;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class ServiceList {
	public ServiceList() {
		super();
	}
	int id;
	Map<Integer, NginxService> serviceBs = new HashMap<>();
	Map<Integer, NginxService> serviceCs = new HashMap<>();
	/**
	 * <br>IP的ID与服务ID的关联
	 */
	Map<Integer, Set<Integer>> map = new HashMap<>();
	
	public int nextId() {
		this.id++;
		return id;
	}
	
	public boolean isUsing(Integer computerId) {
		if (null == computerId) {
			return false;
		}
		return (null != map.get(computerId) && 0 != map.get(computerId).size());
	}
	
	public Map<Integer, NginxService> getServiceBs() {
		return serviceBs;
	}
	public void setServiceBs(Map<Integer, NginxService> serviceBs) {
		this.serviceBs = serviceBs;
	}
	public Map<Integer, NginxService> getServiceCs() {
		return serviceCs;
	}
	public void setServiceCs(Map<Integer, NginxService> serviceCs) {
		this.serviceCs = serviceCs;
	}
	public Map<Integer, Set<Integer>> getMap() {
		return map;
	}
	public void setMap(Map<Integer, Set<Integer>> map) {
		this.map = map;
	}


}
